<?php

namespace App\Console\Commands;

use App\Models\User;
use App\Services\User\RegisterUserService;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;

class FakeCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'fake:up';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Fake Database.';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $this->makeUsers();
    }

    private function makeUsers()
    {
        $attributes = [
            'username' => 'UserA',
            'password' => '',
            'nickname' => 'UserA',
            'avatar' => url('images/avatar1.png'),
            'openid' => 'F9ZD2NTM1LTM3',
            'registered_at' => Carbon::now(),
            'last_login_at' => Carbon::now(),
            'last_login_ip' => '127.0.0.1',
        ];

        dd($attributes);
    }
}
